<?php
namespace Admin\Controller;
use Think\Controller;

class CommonController extends Controller
{
	public function _initialize()
	{
		if(!session('?admin.islogin')){
			// $this -> error('请先登陆！', U('/admin/public/login'), 1);
			// exit();
			$url = U('admin/public/login');
			echo "<script>window.location.href='$url'</script>";
			exit();
		}
	}
}